//
//  YTUserProfileServices.m
//  YiTuDriverClient
//
//  Created by 石少庸 on 2017/5/9.
//  Copyright © 2017年 Yitu. All rights reserved.
//

#import "YTUserProfileServices.h"

@implementation YTUserProfileServices

#pragma mark - 用户信息相关

+ (RACSignal *)loadUserInfo {
    return [[self requestWithURL:@"usercenter/getDriverInfo" paramters:nil] replayLazily];
}

+ (RACSignal *)userFeedBack:(NSString *)feedBack {
    return [self requestWithURL:@"usercenter/contactUsForDriver" paramters:@{@"content" : feedBack}];
}

+ (RACSignal *)driverAuthStep1WithData:(NSDictionary *)dataDict {
    return [self requestWithURL:@"authentication/driverApplyStep2V2" paramters:dataDict];
}

+ (RACSignal *)driverAuthStep2WithData:(NSDictionary *)dataDict {
    return [self requestWithURL:@"authentication/driverApplyStep3V2" paramters:dataDict];
}

+ (RACSignal *)changePhoneNumWithData:(NSDictionary *)dataDict {
    return [self requestWithURL:@"usercenter/changeMobile" paramters:dataDict];
}

+ (RACSignal *)resetPassword:(NSDictionary *)dataDict {
    return [self requestWithURL:@"usercenter/setLoginPassword" paramters:dataDict];
}

+ (RACSignal *)forgetResetPayPassword:(NSDictionary *)dataDict {
    return [self requestWithURL:@"usercenter/forGetPayPasswordDriver" paramters:dataDict];
}

+ (RACSignal *)rememberResetPayPassword:(NSDictionary *)dataDict {
    return [self requestWithURL:@"usercenter/setPayPassword" paramters:dataDict];
}

+ (RACSignal *)userCommentForDriver:(NSDictionary *)dataDict {
    return [self requestWithURL:@"usercenter/getCommentForDriver" paramters:dataDict];
}

+ (RACSignal *)changeAvatarImage:(NSDictionary *)dataDict {
    return [self requestWithURL:@"usercenter/updateDriverFace" paramters:dataDict];
}

+ (RACSignal *)driverServiceScore {
    return [self requestWithURL:@"usercenter/driverServiceScore" paramters:nil];
}

+ (RACSignal *)driverScore {
    return [self requestWithURL:@"usercenter/getDriverPoints" paramters:nil];
}

+ (RACSignal *)driverBreakRecoder {
    return [self requestWithURL:@"usercenter/getMisdeedList" paramters:nil];
}

+ (RACSignal *)saveChangeUserInfo:(NSDictionary *)dataDict {
    return [self requestWithURL:@"usercenter/updateDriverInfo" paramters:dataDict];
}

+ (RACSignal *)loadUserJobEducationLifeYear:(NSString *)typeString {
    return [self requestWithURL:@"usercenter/getDictionaryValueByKey" paramters:@{@"dicKey" : typeString}];
}

+ (RACSignal *)bonusList:(NSDictionary *)dataDict {
    return [[self requestWithURL:@"usercenter/getDriverCouponKeyList" paramters:dataDict] replayLazily];
}

#pragma mark - 财务相关

+ (RACSignal *)laodUserFinance {
    return [self requestWithURL:@"finance/getMoneyInfo" paramters:nil];
}

+ (RACSignal *)loadWithdrawAccount {
    return [self requestWithURL:@"finance/getAccountList" paramters:nil];
}

+ (RACSignal *)addWithdrawAccount:(NSDictionary *)dataDict {
    return [self requestWithURL:@"finance/addAccount" paramters:dataDict];
}

+ (RACSignal *)deleteAccount:(NSDictionary *)dataDict {
    return [self requestWithURL:@"finance/deleteAccount" paramters:dataDict];
}

+ (RACSignal *)withdraw:(NSDictionary *)dataDict {
    return [self requestWithURL:@"finance/drawMoney" paramters:dataDict];
}

+ (RACSignal *)withdrawRecordList:(NSDictionary *)dataDict {
    return [self requestWithURL:@"finance/getFinanceWater" paramters:dataDict];
}
@end
